package cn.exrick.xboot.modules.transport.entity;

import cn.exrick.xboot.base.XbootBaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author gj
 */
@Data
@Accessors(chain = true)
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "b_order_car_info")
@TableName("b_order_car_info")
@ApiModel(value = "订单-车辆信息")
public class OrderCarInfo extends XbootBaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "订单ID")
    private Long orderId;

    @ApiModelProperty(value = "车辆名称")
    private String carName;

    @ApiModelProperty(value = "车辆识别号")
    private String carNumber;

    @ApiModelProperty(value = "运输车牌号")
    private String plateNumber;

    @ApiModelProperty(value = "保险金额")
    private BigDecimal insuranceAmount;

    @ApiModelProperty(value = "保险单号")
    private String insurancePolicyNo;

    @ApiModelProperty(value = "保险单状态  InsuranceStatus枚举中")
    private String insuranceStatus;

    @ApiModelProperty(value = "保险费率")
    private BigDecimal insuranceRatio;

    @ApiModelProperty(value = "保险费用")
    private BigDecimal insuranceFee;

    @ApiModelProperty(value = "保险下单时间")
    private LocalDateTime insuranceCreateTime;

    @ApiModelProperty(value = "保险最近更新时间")
    private LocalDateTime insuranceUpdateTime;

    @ApiModelProperty(value = "gps设备号")
    private String gpsImei;

    @ApiModelProperty(value = "GPS 轨迹路线")
    private String gpsLocation;

    @Transient
    @TableField(exist = false)
    @ApiModelProperty(value = "车辆照片地址")
    private List<OrderCarFile> orderCarFileList;

}